package com.iscreen.entities;
import java.io.Serializable;
import java.sql.Date;
import javax.persistence.Column;
import javax.persistence.Embeddable;

@Embeddable
public class DailyTradeResultsPK implements Serializable {
	@Column(name="TRADE_DATE")
	private Date tradeDate;

	@Column(name="SECURITY_ID")
	private String securityId;

	private static final long serialVersionUID = 1L;

	public DailyTradeResultsPK() {
		super();
	}

	public Date getTradeDate() {
		return this.tradeDate;
	}

	public void setTradeDate(Date tradeDate) {
		this.tradeDate = tradeDate;
	}

	public String getSecurityId() {
		return this.securityId;
	}

	public void setSecurityId(String securityId) {
		this.securityId = securityId;
	}

	@Override
	public boolean equals(Object o) {
		if (o == this) {
			return true;
		}
		if ( ! (o instanceof DailyTradeResultsPK)) {
			return false;
		}
		DailyTradeResultsPK other = (DailyTradeResultsPK) o;
		return this.tradeDate.equals(other.tradeDate)
			&& this.securityId.equals(other.securityId);
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int hash = 17;
		hash = hash * prime + this.tradeDate.hashCode();
		hash = hash * prime + this.securityId.hashCode();
		return hash;
	}

}
